import {useRouter} from "vue-router";
import {useUserStore} from "@/stores";

export const hasPermission = (params:string) => {
  const currentR = useRouter().currentRoute.value.name;
  const {userData} = useUserStore()
  return userData.permission_func[currentR]?userData.permission_func[currentR].includes(params):false
}